<template>
  <div class="container">
    <text class="text">This is new page.</text>
    <div class="btn" @click="closePage">
      <text class="btn-text">Close Page</text>
    </div>
  </div>
</template>

<style scoped>
.container {
  flex-direction: column;
  padding: 20px;
}
.text {
  font-size: 50px;
  color: red;
}
.btn {
  border-radius: 8px;
  border-color: black;
  border-width: 2px;
  padding-top: 25px;
  padding-bottom: 25px;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  background-color: transparent;
}
.btn:active {
  background-color: #ECECEC;
}
.btn-text {
  font-size: 30px;
}
</style>

<script>
  let navigator = weex.requireModule('navigator');
  export default {
    methods: {
      closePage() {
        navigator.pop({
          url: weex.config.bundleUrl,
          animated: true
        })
      }
    }
  }
</script>
